import type { MenuProps } from "antd";

type MenuItem = Required<MenuProps>["items"][number];


function getItem(
  label: React.ReactNode,
  key: string,
  icon?: React.ReactNode,
  children?: MenuItem[],
  type?: "group",
): MenuItem {
  return {
    key,
    icon,
    children: children ? children : [],
    label,
    type
  };
}
export { getItem };
export type { MenuItem };
